/**
 * 自定义模型器
 */

import BpmnModeler from 'bpmn-js/lib/Modeler';
import CustomPaletteProvider from '../palette/CustomPaletteProvider';

class CustomModeler extends BpmnModeler {
  constructor(options: any) {
    super(options);
  }

  // 重写 getModules 方法，添加自定义的模块
  getModules(): any[] {
    console.log('获取模块...', super.getModules());
    return [
      ...super.getModules(),
      CustomPaletteProvider,
    ];
  }
}

export default CustomModeler;